@extends('admin.main.layout')
@section('title', '添加管理员')
@section('content')
<div class="row">
    <div class="col-lg-12">
        <div class="card">
            <div class="card-body">
                <form method="post" action="{{ URL::current(); }}" class="site-form">
                    <div class="m-form-item">
                        <label>
                            <b>*</b>客服头像:
                        </label>
                        <div>
                            <a href="javascript:;" class="m-file" style="float:left;margin-left: 0px;">
                                <font>上传</font>
                                <input type="file" name="upload_avatar" id="upload_avatar" onchange="imageUpload('avatar',1024,true,{},'all')">
                            </a>
                            <img src="{{ Auth::user()->avatar }}" class="m-file-image" id="avatar_show" style="max-width: 300px;">
                            <input type="hidden" name="avatar" id="avatar" value="{{ Auth::user()->avatar }}">
                            @csrf
                        </div>
                    </div>
                    <div class="m-form-item">
                        <label>用户名:</label>
                        <div class="m-col-3 m-xs-12">
                            <input type="text" class="form-control" name="username" id="username" value="{{ Auth::user()->username }}" disabled="disabled" />
                        </div>
                    </div>
                    <div class="m-form-item">
                        <label>昵称:</label>
                        <div class="m-col-3 m-xs-12">
                            <input type="text" class="form-control" name="nickname" id="nickname" placeholder="输入您的昵称" value="{{ Auth::user()->nickname }}">
                        </div>
                    </div>
                    <div class="m-form-item">
                        <button type="submit" class="m-form-btn m-mr-1">保存配置</button>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>
<script type="text/javascript" src="/admin/js/image-upload.js?v={{ time() }}"></script>
@endsection
